//
//  ViewController.m
//  colorTest
//
//  Created by 丁益 on 17/3/31.
//  Copyright © 2017年 celi. All rights reserved.
//

#import "ViewController.h"
#import "DYColorController.h"
@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];

    UIButton *colorbtn = [[UIButton alloc]initWithFrame:CGRectMake(10, 84, 80, 30)];
    colorbtn.backgroundColor = [UIColor grayColor];
    [colorbtn setTitle:@"彩色" forState:UIControlStateNormal];
    [colorbtn addTarget:self action:@selector(colorBtnOnclick:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:colorbtn];
}


#pragma -按键处理
- (void)colorBtnOnclick:(UIButton*)btn
{
    DYColorController *vc = [[DYColorController alloc]init];
    
    [self.navigationController pushViewController:vc animated:YES];
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}


@end
